package o;

import com.huawei.appgallery.foundation.account.bean.UserSession;
import com.huawei.appgallery.foundation.card.base.bean.AppInfoBean;
import com.huawei.appgallery.serverreqkit.api.listener.IServerCallBack;

public class dtw {
    public static boolean ˎ(AppInfoBean appInfoBean) {
        boolean ˊ = dpp.ˏ().ˊ(appInfoBean.ˏॱ());
        Logger.ˎ("APP_SYN", "MultyDeviceSynValidator" + " inUninstalledList=" + ˊ + " pkg=" + appInfoBean.ˏॱ());
        return ˊ;
    }

    public static boolean ˊ(AppInfoBean appInfoBean) {
        int i;
        String ˏॱ = appInfoBean.ˏॱ();
        String ʻ = appInfoBean.ʻ();
        int i2 = 0;
        try {
            if (!dof.ˋ(ʻ)) {
                i2 = Integer.parseInt(ʻ);
            }
            i = i2;
        } catch (NumberFormatException e) {
            Logger.e("APP_SYN", "MultyDeviceSynValidator hasInstalled " + e.getMessage());
            i = 0;
        }
        boolean ˎ = ((cdg) cdb.ॱ(cdg.class)).ˎ(ˏॱ, i);
        Logger.ˎ("APP_SYN", "MultyDeviceSynValidator" + " hasInstalled=" + ˎ + " pkg=" + appInfoBean.ˏॱ() + " version=" + i);
        return ˎ;
    }

    public static boolean ˎ() {
        boolean ˋ = euf.ˎ().ˋ();
        Logger.ˎ("APP_SYN", "MultyDeviceSynValidator isSynBtnOpen=" + ˋ);
        return ˋ;
    }

    public static void ॱ(AppInfoBean appInfoBean, IServerCallBack iServerCallBack) {
        cvt o_dtr = new dtr();
        o_dtr.ˎ(appInfoBean.ˏॱ());
        cfw.ˎ(o_dtr, iServerCallBack);
    }

    public static boolean ॱ() {
        boolean isLoginSuccessful = UserSession.getInstance().isLoginSuccessful();
        Logger.ˎ("APP_SYN", "MultyDeviceSynValidator isLogin=" + isLoginSuccessful);
        return isLoginSuccessful;
    }

    public static boolean ˏ(AppInfoBean appInfoBean) {
        Logger.ˎ("APP_SYN", "MultyDeviceSynValidator localValidate");
        return ॱ() && ˎ() && !ˎ(appInfoBean) && !ˊ(appInfoBean);
    }

    public static boolean ˋ() {
        boolean z = true;
        if (1 != doo.ʼ(ContentManager.getInstant().getContext()) || doo.ᐝ(ContentManager.getInstant().getContext())) {
            z = false;
        }
        Logger.ˎ("APP_SYN", "MultyDeviceSynValidator isWifi=" + z);
        return z;
    }
}
